package com.gpzx.zx.module.home.ui.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.wkq.base.frame.activity.MvpBindingActivity
import com.gpzx.zx.R
import com.gpzx.zx.databinding.ActivityChapterListBinding
import com.gpzx.zx.databinding.ActivityHomeNewsListBinding
import com.gpzx.zx.databinding.ActivityOrgTypeListBinding
import com.gpzx.zx.module.home.frame.presenter.OrgTypeListPresenter
import com.gpzx.zx.module.home.frame.view.OrgTypeListView

/**
 *
 * 作者:吴奎庆
 *
 * 时间:2020/6/8
 *
 * 用途:
 */


class OrgTypeListActivity : MvpBindingActivity<OrgTypeListView, OrgTypeListPresenter, ActivityOrgTypeListBinding>() {
    var title: String? = ""

    companion object {
        fun newInstance(context: Context) {
            var intnet = Intent(context, OrgTypeListActivity().javaClass)
            context.startActivity(intnet)
        }

        fun newInstance(context: Context, title: String) {
            var intnet = Intent(context, OrgTypeListActivity().javaClass)
            intnet.putExtra("title", title)
            context.startActivity(intnet)
        }
    }

    override fun getLayoutId(): Int {
        return R.layout.activity_org_type_list
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        title = intent.getStringExtra("title")
        if (mvpView != null) mvpView.initView(title!!)
        if (presenter != null) presenter.initData(this,title)
    }


}